package com.ruoyi.psi.purchase.purchasereturn.service;


import com.ruoyi.psi.purchase.purchasereturn.domain.PurchaseReturn;
import com.ruoyi.psi.purchase.purchasereturn.domain.PurchaseReturnList;

import java.util.List;

/**
 * 采购退货
 * 业务层
 */
public interface IPurchaseReturnService {


    /**
     * 采购订单退货查询
     * @param purchaseReturn
     * @return
     */
    public List<PurchaseReturn> selectPurchaseReturnList(PurchaseReturn purchaseReturn);
    /**
     * 新增时获取入库单详细
     * @param purchaseStorageId
     * @return
     */
    public List<PurchaseReturnList> getPurchaseStorageForReturn(String purchaseStorageId);
    /**
     * 按编号查询
     * @param purchaseReturnId 采购订单退货编号
     * @return
     */
    public PurchaseReturn selectPurchaseReturnById(String purchaseReturnId);

    /**
     * 采购订单退货新增
     * @param purchaseReturn
     * @return
     */
    public int insertPurchaseReturn(PurchaseReturn purchaseReturn) throws Exception;

    /**
     * 采购订单退货更新
     * @param purchaseReturn
     * @return
     */
    public int updatePurchaseReturn(PurchaseReturn purchaseReturn) throws Exception;

    /**
     * 更新采购订单退货删除标志位
     * @param purchaseReturn
     * @return
     */
    public int updatePurchaseReturnDeleteFlag(PurchaseReturn purchaseReturn);

    /**
     * 采购订单退货详细查询
     * @param purchaseReturnList
     * @return
     */
    public List<PurchaseReturnList> selectPurchaseReturnListList(PurchaseReturnList purchaseReturnList);

    /**
     * 查询采购订单退货对应的所有产品详细
     * @param purchaseReturnId 采购订单退货编号
     * @return
     */
    public List<PurchaseReturnList> selectPurchaseReturnListListById(String purchaseReturnId);

    /**
     * 查询采购订单退货对应的指定产品详细
     * @param purchaseReturnId
     * @return
     */
    public PurchaseReturnList  selectPurchaseReturnListById(String purchaseReturnId, String produceId);
}
